package com.lichuandi.service.impl;

import com.lichuandi.service.DiscountStrategy;
import org.springframework.stereotype.Component;

// 具体策略实现
@Component("seasonalDiscount")// 明确指定bean名称
public class SeasonalDiscountStrategy implements DiscountStrategy {
    @Override
    public double applyDiscount(double amount) {
        return amount * 0.9; // 10% off
    }
}